package com.mainboot.example.kafka.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mainboot.example.kafka.service.KafkaSender;
/**
 * 
 * @author 闽南码农
 *  
 */
@RestController
@RequestMapping("mainboot/kafka")
public class KafkaController {

	@Autowired
	private KafkaSender kafkaSender;
		 
	/**
	 * http://127.0.0.1:8080/mainboot/kafka/send
	 * @return
	 */
	@RequestMapping("send")
	public String send() {
		String result = "成功";
		kafkaSender.sendTest();
		return result;
	}
}
